package com.mengfou.appserver.controller;

import com.yanzhenjie.andserver.annotation.GetMapping;
import com.yanzhenjie.andserver.annotation.PostMapping;
import com.yanzhenjie.andserver.annotation.PutMapping;
import com.yanzhenjie.andserver.annotation.RequestMapping;
import com.yanzhenjie.andserver.annotation.RequestParam;
import com.yanzhenjie.andserver.annotation.RestController;

/**
 * @author 梦否 on 2024/1/5
 * @blog https://mengfou.blog.csdn.net/
 */

@RestController
@RequestMapping(path = "/user")
public class HelloController {

    @PostMapping("/login")
    public String login(@RequestParam("account") String account,
                        @RequestParam("password") String password) {
        return "Successful.";
    }

    @GetMapping(path = "/hello")
    public String info() {
        return "user";
    }

    @PutMapping(path = "/userId")
    public void modify(@RequestParam("userId") String userId
                       , @RequestParam("age") int age) {
    }
}